package fr.liglab.adele.icasa.house.factory.dao;

import org.apache.felix.ipojo.InstanceManager;

import fr.liglab.adele.icasa.device.DeviceListener;
import fr.liglab.adele.icasa.device.GenericDevice;

public class GenesisDeviceDAO {
	String name;
	String compName;
	GenericDevice object;
	Class classtype;
	InstanceManager instanceManager;
	DeviceListener listener;
	
	public InstanceManager getInstanceManager() {
		return instanceManager;
	}

	public void setInstanceManager(InstanceManager instanceManager) {
		this.instanceManager = instanceManager;
	}

	public Class getClasstype() {
		return classtype;
	}

	public void setClasstype(Class classtype) {
		this.classtype = classtype;
	}

	public GenesisDeviceDAO(String name, Class classtype){
		this.name=name;
		this.classtype=classtype;
	}
	
	public GenesisDeviceDAO(String name, Class classtype, DeviceListener listener){
		this.name=name;
		this.classtype=classtype;
		this.listener=listener;
	}
	
	public DeviceListener getListener() {
		return listener;
	}

	public void setListener(DeviceListener listener) {
		this.listener = listener;
	}

	public GenesisDeviceDAO(String name, String compName, GenericDevice object){
		this.name=name;
		this.compName=compName;
		this.object=object;
	}
	public String getCompName() {
		return compName;
	}
	public void setCompName(String compName) {
		this.compName = compName;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public GenericDevice getObject() {
		return (GenericDevice)instanceManager.getPojoObject();
		//return object;
	}
	//public void setObject(GenericDevice object) {
	//	this.object = object;
	//}
	
}
